extends ../components/base
block title
    title 首页
block common_header
    include ../components/header
    +commonheader(0)
block style
    style.
        #main-wrapper {
            margin-top: 10px;
        }
block aside_content
    include ../components/mixin
    -var routerObj = [{link:'/',text:'应用',icon:'icon-app'},{link:'/message',text:'消息',icon:'icon-message2'},{link:'/setting/user_manage',text:'平台管理',icon:'icon-setting'}]
    +asideNav(routerObj,0)
block main_content
    .home.clearfix
        .module-wrapper
            if(moduleGroups.length)
                each group in moduleGroups
                    .module-nav
                        .nav-heading.clearfix
                            h3 #{group}
                            a.more
                                | 更多
                                i.icon-add
                        ul.nav-body.clearfix
                            each module in modulesInfo
                                if(module.groupName === group)
                                    li
                                        if(module.openType === 1)
                                            a(href=module.url data-id=module.id)
                                        else
                                            a(href=module.url target="_blank" data-id=module.id)
                                                .img-wrapper
                                                    img(style="width:60px;" src = module.icon === "default-icon" ? __IMAGES_PATH__ + '/nav.png' : module.icon)
                                                span #{module.name}
        #calendar
        input#calendarMark(type="hidden" value=mark)
    link(rel='stylesheet', href=__PLUGINS_PATH__ + '/calendar/simple-calendar.css')
    script(src=__PLUGINS_PATH__ + "/calendar/simple-calendar.js")
    script(type="text/javascript").
        var options = {
            width: '320px',
            height: '320px',
            language: 'CH', //语言
            showLunarCalendar: false, //阴历
            showHoliday: false, //休假
            showFestival: false, //节日
            showLunarFestival: true, //农历节日
            showSolarTerm: false, //节气
            showMark: true, //标记
            timeRange: {
                startYear: 2010,
                endYear: 2049
            },
            mark: JSON.parse($('#calendarMark').val()),
            theme: {
                changeAble: true,
                weeks: {
                    backgroundColor: '#FFFFFF',
                    fontColor: '#000000',
                    fontSize: '15px',
                },
                days: {
                    backgroundColor: '#ffffff',
                    fontColor: '#565555',
                    fontSize: '14px'
                },
                todaycolor: '#82C2F1',
                activeSelectColor: '#82C2F1',
            }
        };
        var myCalendar = new SimpleCalendar('#calendar',options);

